<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
username:<input id="username" type="text" name="username" /><br>
password:<input id="pwd" type="password" name="password" /> <br>
date: <input id="date" type="date" name="date">
<button  type="submit" onclick="sub()">sub</button>
</body>
<script>
  var date = "2013-09-05"
  document.getElementById('date').value =date
    function sub(){
      var params = {
        username: document.getElementById('username').value,
        pwd: document.getElementById('pwd').value,
        date: document.getElementById('date').value
      }
      console.log(params)
    }
</script>
</html>
